package com.jing21.learn.intf.feignclients;

import com.github.pagehelper.PageInfo;
import com.jing21.learn.common.learn.PageQuery;
import com.jing21.learn.intf.entity.Product;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by 郑靖 on 2017/9/22.
 */
@RequestMapping("/product")
@FeignClient("basic-service")
public interface ProductClient extends BasciClient{

    @ApiOperation("新增或者更新")
    @RequestMapping(value = "/saveOrUpdate",method = RequestMethod.POST)
    boolean saveOrUpdate(Product product);

    @ApiOperation("分页查询")
    @RequestMapping(value = "/selectByPage", method = RequestMethod.POST)
    PageInfo<Product> selectByPage(PageQuery<Product> page);
}
